﻿@model ContactMvc4TB.Models.Worktime.HolidayCreateModel

@{
    ViewBag.Title = "Urlaubstage festlegen";
}

<div class="span12">
    <h2>Urlaubstage festlegen</h2>
    <hr />
    <div class="well">Anlegen/eintragen der Urlaubsdauer in Tagen für das jeweilige Jahr</div>
</div>
<div class="span12">
    @using (Html.BeginForm(EActionWorktime.HolidayCreate.ToString(), EControllers.Worktime.ToString(), new { id = Model.Id, userId = Model.UserId }, FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <fieldset>
         @Html.ShowCustomMessage()
            @Html.MyValidationSummary()

            <div class="control-group">
                @Html.LabelFor(model => model.Year, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Year)
                    @Html.ValidationMessageFor(model => model.Year)
                <a href="#" class="helpPopOver" data-content="Geben Sie hier das Jahr ein zu dem Sie die Anzahl Ihrer Urlaubstage eintragen wollen." data-placement="top" data-toggle="popover" data-trigger="hover" data-original-title="Urlaubsjahr"><i class="icon-question-sign"></i></a>
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Days, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Days)
                    @Html.ValidationMessageFor(model => model.Days)
                <a href="#" class="helpPopOver" data-content="Geben Sie hier die Anzahl Ihrer Urlaubstage, passend zum angegebenen Jahr ein." data-placement="top" data-toggle="popover" data-trigger="hover" data-original-title="Urlaubstage"><i class="icon-question-sign"></i></a>
                </div>
            </div>
            <div class="form-actions">
               @if (Model.Id == 0)
                {
                    <input class="btn btn-primary" type="submit" value="@Navigation.CreateRESX" />
                }
                else
                {
                    <input class="btn btn-primary" type="submit" value="@Navigation.SaveChangesRESX" />
                }
            </div>
        </fieldset>
    }
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")

    <script>
        //Registrieren des PopOvers von BootStrap zum Anzeigen von Hilfetexten
        $(".helpPopOver").popover();

    </script>
}
